package cn.edu.zxj.message_wall.service;

import cn.edu.zxj.message_wall.mapper.MessageWallMapper;
import cn.edu.zxj.message_wall.model.MessageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description：
 *
 * @author: zxj
 * @date: 2024-01-24
 * @time: 13:24:53
 */
@Service
public class MessageWallService {
    @Autowired
    MessageWallMapper messageWallMapper;

    public boolean add(MessageInfo message) {
        messageWallMapper.insert(message);
        return true;
    }

    public List<MessageInfo> getAllMessages() {
        return messageWallMapper.selectAllMessages();
    }
}
